﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Groep8.Edit_Festivals
{
    /// <summary>
    /// Deze klasse behandelt wijzigingen
    /// </summary>
    public partial class Edit : System.Web.UI.Page
    {
        public string Message = "";

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void AddFestival(object sender, EventArgs e)
        {
            DataAccessLayer con = new DataAccessLayer();

            string Name = FestivalName.Text;
            string Loc = Location.Text;
            String DateText = Date.Text;
            string CountryText = Country.Text;
            int DurationText = Convert.ToInt16(Duration.Text);

            con.AddFestival(Name, Loc, DateText, CountryText, DurationText);

            Response.Redirect("~/Edit_Festivals/Edit.aspx");
        }
    }
}